package per.turtle.system.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import per.turtle.common.core.web.entity.Query;

import java.time.LocalDateTime;
import java.util.List;

/**
 * @author turtle
 */
@ApiModel(value = "SysOperLog", description = "操作日志记录")
@Data
@EqualsAndHashCode(callSuper = true)
@TableName("sys_oper_log")
public class SysOperLog extends Query {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty("日志主键")
    @TableId(type = IdType.AUTO)
    private Long operId;

    @ApiModelProperty("操作模块")
    private String title;

    @ApiModelProperty("业务类型（0：其它；1：新增；2：修改；3：删除）")
    private Integer businessType;

    @ApiModelProperty("业务类型数组")
    @TableField(exist = false)
    private List<Integer> businessTypes;

    @ApiModelProperty("请求方法")
    private String method;

    @ApiModelProperty("请求方式")
    private String requestMethod;

    @ApiModelProperty("操作类别（0：其它；1：后台用户；2：手机端用户）")
    private Integer operatorType;

    @ApiModelProperty("操作人员")
    private String operName;

    @ApiModelProperty("部门名称")
    private String deptName;

    @ApiModelProperty("请求url")
    private String operUrl;

    @ApiModelProperty("操作地址")
    private String operIp;

    @ApiModelProperty("请求参数")
    private String operParam;

    @ApiModelProperty("返回参数")
    private String jsonResult;

    @ApiModelProperty("操作异常（0：否；1：是）")
    private Boolean hasException;

    @ApiModelProperty("错误消息")
    private String errorMsg;

    @ApiModelProperty("操作时间")
    private LocalDateTime operTime;

}
